package ph.gov.marikina.mcsmtms.services.impl;

import java.util.Date;
import java.util.List;

import ph.gov.marikina.mcsmtms.constants.GlobalConstants.Roads;
import ph.gov.marikina.mcsmtms.constants.GlobalConstants.SituationTypes;
import ph.gov.marikina.mcsmtms.constants.GlobalConstants.TrafficConditionTypes;
import ph.gov.marikina.mcsmtms.dao.MobileUserReportDAO;
import ph.gov.marikina.mcsmtms.domain.MobileUserReport;
import ph.gov.marikina.mcsmtms.services.MobileUserReportService;

public class MobileUserReportServiceImpl implements MobileUserReportService {
	
	/** The user dao. */
    private MobileUserReportDAO mobileUserReportDAO;
    
	/**
	 * Sets the user dao.
	 *
	 * @param userDAO the new user dao
	 */
	public void setMobileUserReportDAO(MobileUserReportDAO mobileUserReportDAO) {
		this.mobileUserReportDAO = mobileUserReportDAO;
	}
	
	public void addMobileUserReport(MobileUserReport mobileUserReport) {
		mobileUserReportDAO.addMobileUserReport(mobileUserReport);
	}
	
	public List<MobileUserReport> getAllMobileUserReports() {
		List<MobileUserReport> mobileUserReportList = mobileUserReportDAO.getAllMobileUserReports();
		
//		for(MobileUserReport mobileUserReport : mobileUserReportList) {
//			mobileUserReport.setRoad(Roads.getDescriptionByCode(mobileUserReport.getRoad()));
//			mobileUserReport.setSituation(SituationTypes.getDescriptionByCode(mobileUserReport.getSituation()));
//			mobileUserReport.setTrafficCondition(TrafficConditionTypes.getDescriptionByCode(mobileUserReport.getTrafficCondition()));
//		}
		
		return mobileUserReportList;
	}
	
	@Override
	public List<MobileUserReport> getMobileUserReportsForDate(Date date) {
		List<MobileUserReport> mobileUserReportList = mobileUserReportDAO.getMobileUserReportsForDate(date);
		return mobileUserReportList;
	}
}
